package com.yxc.elastic.plugin;

import com.yxc.elastic.plugin.lcs.LcsScriptEngine;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.plugins.ScriptPlugin;
import org.elasticsearch.script.ScriptContext;
import org.elasticsearch.script.ScriptEngine;

import java.util.Collection;

/**
 * Lsc相似度
 *
 * @author: YXC
 * @time: 2024/1/3 16:30
 **/
public class LcsNativeScriptPlugin extends Plugin implements ScriptPlugin {

    @Override
    public ScriptEngine getScriptEngine(Settings settings, Collection<ScriptContext<?>> contexts) {
        return new LcsScriptEngine();
    }
}
